ListBox.DragReorderRows Event

Triggered when a row being reordered by dragging is dropped on the ListBox. The parameter newPosition indicates the row at which the dragged row is to be inserted.

Syntax

DragReorderRows ( NewPosition, ParentRow )

Parameters

NewPosition

Integer

ParentRow

Integer


Returns a Boolean. Returning True prevents the reordering from happening.

The ParentRow parameter gives you the row number of the parent folder if you are dragging within a hierarchical ListBox. As is the case for NewPosition, the row numbers are adjusted for the assumption that all selected rows will be deleted. A value of -1 indicates a drop at the root level of the ListBox. That is, there is no parent row.

The DragReorderRows event fires, but the user is responsible for reordering the rows. It is the same behavior as returning True in the DragReorderRows event.